package base.day16.controller;

import base.day16.domain.Student;

import java.util.Scanner;

public class StudentController extends BaseOtherStudentController {
    Scanner sc=new Scanner(System.in);
//    public Student inputStudentInfo(String id){
//        System.out.println("请输入姓名：");
//        String name=sc.next();
//        System.out.println("请输入年龄：");
//        int age=sc.nextInt();
//        System.out.println("请输入生日：");
//        String birthday=sc.next();
//        //将输入的学生信息封装为学生对象
//        Student stu=new Student(id,name,age,birthday);
//        return stu;
//    }

    @Override
    public Student inputStudentInfo(String id) {
        System.out.println("请输入姓名：");
        String name=sc.next();
        System.out.println("请输入年龄：");
        int age=sc.nextInt();
        System.out.println("请输入生日：");
        String birthday=sc.next();
        //将输入的学生信息封装为学生对象
        Student stu=new Student(id,name,age,birthday);
        return stu;
    }
}
